file (GLOB_RECURSE SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/*.cc)
include_directories(.)
# include_directories("C:\\Program Files\\MySQL\\MySQL Server 8.0\\include")
# link_directories("C:\\Program Files\\MySQL\\MySQL Server 8.0\\lib")
add_library(lxmysql  SHARED ${SRC_FILES})
target_link_libraries(lxmysql PRIVATE mysqlclient)
# 为 LXMysql 目标添加宏定义
target_compile_definitions(lxmysql PRIVATE LXMYSQL_EXPORTS)
set_out_path(lxmysql)
set_runtime_name(lxmysql)
# 设置安装路径
install(TARGETS lxmysql
    ARCHIVE DESTINATION lib
    LIBRARY DESTINATION lib
    RUNTIME DESTINATION bin
)
# 安装头文件
install(FILES LXMysql.h LXData.h
    DESTINATION include/xcom/lxmysql
)